﻿<UserControl x:Class="AlgorithmBox.FlowCharts.FlowChart"
						 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
						 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
						 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
						 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
						 xmlns:my="clr-namespace:AlgorithmBox.FlowCharts"
						 mc:Ignorable="d"
						 d:DesignHeight="460"
						 d:DesignWidth="500"
						 KeyDown="FlowChart_KeyDown">
	<Border x:Name="myBorder" BorderThickness="4"
					BorderBrush="Black"
					CornerRadius="5">

		<ScrollViewer VerticalScrollBarVisibility="Visible"
									HorizontalScrollBarVisibility="Visible">
			<Canvas x:Name="Sketch"
							Panel.ZIndex="-1"
							Background="Transparent"
							HorizontalAlignment="Stretch"
							VerticalAlignment="Stretch"
							MouseLeftButtonDown="FlowChart_MouseLeftButtonDown"
							MouseMove="FlowChart_MouseMove"
							MouseEnter="FlowChart_MouseEnter"
							MouseLeave="FlowChart_MouseLeave"
							MouseLeftButtonUp="FlowChart_MouseLeftButtonUp">
				<my:Start x:Name="StartFlow"
									Canvas.Left="200"
									Canvas.Top="0"/>
				<my:Stop x:Name="EndFlow"
								 Canvas.Left="200"
								 Canvas.Top="385"/>
				<Image Panel.ZIndex="-1">
					<Image.Source>
						<DrawingImage>
							<DrawingImage.Drawing>
								<DrawingGroup>

									<GeometryDrawing>
										<GeometryDrawing.Pen>
											<Pen Brush="Red"
													 Thickness="0" />
										</GeometryDrawing.Pen>
										<GeometryDrawing.Geometry>
											<GeometryGroup>
												<RectangleGeometry x:Name="drawingBorder"
																					 Rect="0,0,500,500" />
											</GeometryGroup>
										</GeometryDrawing.Geometry>
									</GeometryDrawing>

									<GeometryDrawing>
										<GeometryDrawing.Pen>
											<Pen x:Name="linePen"
													 Brush="Black"
													 Thickness="5"
													 DashCap="Round">
												<Pen.DashStyle>
													<DashStyle Dashes="-.1,2"
																		 Offset="0"/>
												</Pen.DashStyle>
											</Pen>
										</GeometryDrawing.Pen>
										<GeometryDrawing.Geometry>
											<GeometryGroup x:Name="connectionLinesGeometry">
												
											</GeometryGroup>
										</GeometryDrawing.Geometry>
									</GeometryDrawing>

								</DrawingGroup>
							</DrawingImage.Drawing>
						</DrawingImage>
					</Image.Source>
				</Image>
				
			</Canvas>
		</ScrollViewer>

	</Border>
</UserControl>
